<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计算器</title>
    <script src="jQuery.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        li {
            list-style: none;
        }

        a {
            text-decoration: none;
        }



        .counter {
            width: 280px;
            height: 400px;
            background-color: skyblue;
            margin: 20%;
            border: 2px solid rgb(19, 49, 133);
        }

        .counter h3 {
            height: 50px;
            font-size: 36px;
            text-align: center;
            line-height: 50px;
        }

        .counter div {
            width: 280px;
            height: 58px;
            border: 1px solid #000;
            /* background-color: purple; */

        }

        .counter ul {
            width: 280px;
            height: 300px;
            background-color: pink;
            /* float: left; */
        }

        .counter ul li {
            float: left;

        }

        .counter ul li button {
            width: 50px;
            height: 50px;
            margin: 10px;
            text-align: center;
            line-height: 50px;
            font-size: 24px;
        }
    </style>
    <script>
        var str = "";
        function toClick(btn) {
            str = $(".btn").val();
        }
        // var count1 = $(".count").val();
        var count1 = $(".count").val();
        $(".count").html(count1 + str);
    </script>
</head>

<body>
    <div class="counter">
        <h3>飛1.0计数器</h3>
        <div class="count" placeholder="请输入计算" value=""> 1</div>
        <ul>
            <li><button class="btn01" onclick="toClick('btn01')" value="1">1</button></li>
            <li><button class="btn02" onclick="toClick('btn02')" value="2">2</button></li>
            <li><button class="btn03" onclick="toClick('btn03')" value="3">3</button></li>
            <li><button class="btn04" onclick="toClick('btn04')" value="+">+</button></li>
            <li><button class="btn05" onclick="toClick('btn05')" value="4">4</button></li>
            <li><button class="btn06" onclick="toClick('btn06')" value="5">5</button></li>
            <li><button class="btn07" onclick="toClick('btn07')" value="6">6</button></li>
            <li><button class="btn08" onclick="toClick('btn08')" value="-">-</button></li>
            <li><button class="btn09" onclick="toClick('btn09')" value="7">7</button></li>
            <li><button class="btn10" onclick="toClick('btn10')" value="8">8</button></li>
            <li><button class="btn11" onclick="toClick('btn11')" value="9">9</button></li>
            <li><button class="btn12" onclick="toClick('btn12')" value="*">*</button></li>
            <li><button class="btn13" onclick="toClick('btn13')" value="0">0</button></li>
            <li><button class="btn14" onclick="toClick('btn14')" value=".">.</button></li>
            <li><button class="btn15" onclick="toClick('btn15')" value="=">=</button></li>
            <li><button class="btn16" onclick="toClick('btn16')" value="/ ">/</button></li>
        </ul>
    </div>
    <!-- 
1
2
3
+
4
5
6
-
7
8
9
*
0
.
=
/ 
-->
</body>

</html>